Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tc process and tc apply. #33

Merged
merged 19 commits into from
Dec 16, 2021
Merged

Fix tc process and tc apply. #33

merged 19 commits into from
Dec 16, 2021

Conversation

IbraheemYSaleh
Copy link
Contributor

No description provided.

fsw/src/crypto.c Outdated
@@ -1753,7 +1800,7 @@ static int32 Crypto_Key_verify(char* ingest,TC_t* tc_frame)
iv_loc = count;
for (int y = 0; y < IV_SIZE; y++)
{
ingest[count++] = tc_frame->tc_sec_header.iv[y];
ingest[count++] = *(tc_frame->tc_sec_header.iv)+y;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Believe this +y should be on the inside of the parens. Cody and I are reviewing and making changes as we go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed.

fsw/src/crypto.c Outdated
{
if(crypto_config->crypto_check_fecf == TC_CHECK_FECF_TRUE)
{
uint16 received_fecf = (tc_sdls_processed_frame->tc_header.fl-1 & 0xFF00) | (tc_sdls_processed_frame->tc_header.fl & 0x00FF);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is incorrect. It should be as follows:
uint16 received_fecf = (((ingest[tc_sdls_processed_frame->tc_header.fl - 1] << 8) & 0xFF00) | (ingest[tc_sdls_processed_frame->tc_header.fl] & 0x00FF));

@IbraheemYSaleh IbraheemYSaleh merged commit 6f5b373 into collab_main Dec 16, 2021
@rjbrown2 rjbrown2 deleted the fixTcProcess branch December 16, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants